<form autocomplete="off" class="layui-form layui-box modal-form-box" action="{:request()->url()}" data-auto="true"
      method="post">

    <div class="layui-form-item">
        <label class="layui-form-label">名称</label>
        <div class="layui-input-block">
            <input name="title" value='{$vo.title|default=""}' required="required" title="内容" class="layui-input">
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">所属商家:</label>
        <div class="layui-input-block">

                {if isset($vo['shop_id'])}
                <select name="shop_id" class="layui-select" style="display: block;">
                    {volist name="sys_level" id="vi"}
                    <option value="{$vi.id}" {if $vo['shop_id'] eq $vi.id}selected="selected"{/if}>{$vi.shop_name}</option>
                    {/volist}
                </select>
                {else}
                <select name="shop_id" class="layui-select" style="display: block;">
                    {volist name="sys_level" id="vi"}
                    <option value="{$vi.id}">{$vi.shop_name}</option>
                    {/volist}
                </select>
                {/if}

        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">分值</label>
        <div class="layui-input-block">
            <input name="shuliang" value='{$vo.shuliang|default=""}' required="required" title="0" class="layui-input">
        </div>
    </div>

    <!--<div class="layui-form-item">
        <label class="layui-form-label">内容</label>
        <div class="layui-input-block">
            <textarea name="content">{$vo.content|default=''|htmlspecialchars_decode}</textarea>
        </div>
    </div>-->
    <div class="hr-line-dashed"></div>

    <div class="layui-form-item text-center">
        {if isset($vo['id'])}<input type='hidden' value='{$vo.id}' name='id'>{/if}
        <button class="layui-btn" type='submit'>保存数据</button>
        <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗？" data-close>取消编辑</button>
    </div>

</form>
<script>
    require(['jquery', 'ckeditor', 'angular'], function () {
        window.createEditor('[name="content"]', {height: 500});
    })

</script>
<script>
    laydate.render({
        elem: '#test14'
        ,type: 'time'
        ,range: true
    });
</script>
